import React, {Component} from "react";
import TabBar from "../Public/Components/TabBar";
import {Tabs} from "antd-mobile";
import Order from "./Order";

export default class Index extends Component {

    constructor(props, context) {
        super(props, context);
        this.state = {};
    }

    componentWillMount() {
    }

    render() {
        const tabs = [
            {title: '待使用'},
            {title: '已使用'},
        ];

        return (
            <div>

                <TabBar
                    OrderActive={true}
                />
                <div
                    style={{height: document.documentElement.clientHeight - (document.documentElement.clientHeight / 7.2)}}>
                    <Tabs tabs={tabs}
                          initalPage={'t2'}
                          swipeable={false}
                          animated={false}
                          onChange={(tab, index) => { console.log('onChange', index, tab); }}
                    >
                        <div>
                            <Order tabIndex="2"/>
                        </div>
                        <div>
                            <Order tabIndex="3"/>
                        </div>
                    </Tabs>
                </div>
            </div>
        )
    }
}


